import 'package:dio/dio.dart';
import 'package:retrofit/http.dart';
import 'package:ui_demo/market/stock.dart';
import 'package:ui_demo/market/stock_detail_bean.dart';
import 'constant.dart';
part 'stock_api.g.dart';

final dio = Dio(); // Provide a dio instance
// dio.options.headers['Demo-Header'] = 'demo header'; // config your dio headers globally
final client = RestClient(dio);

@RestApi(baseUrl: baseUrl)
abstract class RestClient {
  factory RestClient(Dio dio, {String baseUrl}) = _RestClient;

  @GET('/hslt/list/$licence')
  Future<List<Stock>> getStockList();


  @GET('/hsrl/ssjy/{id}/$licence')
  Future<StockDetailBean> getStockDetail(@Path('id') String id);
}